<?php
use JetBrains\PhpStorm\NoReturn;
use RPC\BaseController;
use RPC\YarRPC;
use RPC\YarServer\UserServer;

class RpcController extends BaseController
{
    protected YarRPC $rpcServer;
    #[NoReturn] public function init(): void
    {
        $this->rpcServer = new YarRPC();
        parent::init();
    }

    public function userAction():void
    {
        $this->rpcServer->server(new UserServer());
    }

}
